<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<title>ID选择器的示例</title>
<script type="text/javascript" src="JS/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
		$("input[type='button']").click(function(){		//为按钮绑定单击事件
			var inputValue = $("#testInput").val();  	//获取文本输入框的值
	 		alert(inputValue);
		});
   });
</script>

</head>

<body>
  <input type="text" id="testInput" name="test" value=""/>
  <input type="button" value="输入的值为"/>
</body>
</html>
